<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_CreateTable_user_resetpwd extends CI_Migration
{
    public function up()
    {
        $this->dbforge->add_field('id');
        $this->dbforge->add_field(array(
            'user_id'          => array('type' => 'INT', 'constraint' => '9',),
            'resetpwd_token'  => array('type' => 'VARCHAR', 'constraint' => '32',),
            'time_of_validity' => array('type' => 'DATETIME', 'null' => TRUE,),
        ));
        $this->dbforge->create_table('user_resetpwd');
    }

    public function down()
    {
        $this->dbforge->drop_table('user_resetpwd');
    }
} 